package pers.mtx.hmw.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.mtx.hmw.entity.Users;
import pers.mtx.hmw.service.UsersService;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mtx
 * @since 2022-03-17
 */
@RestController
@RequestMapping("/users")
public class UsersController {
    @Autowired
    UsersService usersService;

    @GetMapping("userList")
    public List<Users> getUserList(){
        return usersService.list();
    }
}
